Skip to content

Clarify documentation in attach/detachInterrupt syntax section #555

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 22, 2019
Merged

Clarify documentation in attach/detachInterrupt syntax section #555

merged 1 commit into from
Mar 22, 2019

Conversation

per1234
Copy link
Collaborator

@per1234 per1234 commented Feb 20, 2019

Feedback was recieved that it wasn't clear whether the second sentence of the attachInterrupt(pin, ISR, mode) syntax description was related to the first sentence (i.e. is the syntax not recommended for Arduino SAMD Boards, Uno WiFi Rev2, Due, 101 only and the syntax is recommended for any other board type?).

As the notes for the syntax section grow longer, it makes me think that the standard formatting of this section is not ideal. This is a similar situation to what I've already reported for the Parameters section (#533), so it would make sense to apply whichever updated formatting standard that's decided on for the Parameters section to the Syntax section as well.


Originally reported at http://forum.arduino.cc/index.php?topic=598501.msg4064897#msg4064897

@@ -59,7 +59,7 @@ For more information on interrupts, see http://gammon.com.au/interrupts[Nick Gam
=== Syntax
`attachInterrupt(digitalPinToInterrupt(pin), ISR, mode);` (recommended) +
`attachInterrupt(interrupt, ISR, mode);` (not recommended) +
`attachInterrupt(pin, ISR, mode);` (Not recommended. Arduino SAMD Boards, Uno WiFi Rev2, Due, 101 only)
`attachInterrupt(pin, ISR, mode);` (Not recommended. This syntax is for use with Arduino SAMD Boards, Uno WiFi Rev2, Due, 101 only.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi per
I think this is still somewhat confusing. What do you think of replacing
Not recommended. This syntax is for use with Arduino SAMD Boards, Uno WiFi Rev2, Due, 101 only.
for
Not recommended. Additionally, this syntax only works on Arduino SAMD Boards, Uno WiFi Rev2, Due, and 101?

Feedback was recieved that it wasn't clear whether the second sentence of the attachInterrupt(pin, ISR, mode) syntax description was related to the first sentence (i.e. is the syntax not recommended for Arduino SAMD Boards, Uno WiFi Rev2, Due, 101 only and the syntax is recommended for any other board type?).
@per1234
Copy link
Collaborator Author

per1234 commented Mar 21, 2019

@robsoncouto I have now updated this as you suggested.

@robsoncouto robsoncouto merged commit 758453d into arduino:master Mar 22, 2019
@robsoncouto
Copy link
Contributor

Awesome. Merged
Thanks per!

@per1234 per1234 deleted the improve-attachinterrupt-syntax-documentation branch March 22, 2019 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants